#ifndef GSRDEVICETHREAD_H
#define GSRDEVICETHREAD_H

#include <QThread>
#include <QMutex>
#include "GSRDevice.h"

class GSRDeviceThread : public QThread
{
    Q_OBJECT

public:
    explicit GSRDeviceThread(GSRDevice* device, QObject* parent = nullptr);
    ~GSRDeviceThread();

    // 启动线程
    void startThread();
    // 停止线程
    void stopThread();

protected:
    void run() override;

private:
    GSRDevice* m_gsrDevice;
    QMutex m_mutex;
    bool m_running;
};

#endif // GSRDEVICETHREAD_H
